package com.ddzh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ddzh.pojo.UserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserRoleMapper extends BaseMapper<UserRole> {
    @Select("select role_id from user_role_t where user_id=#{userId}")
    Long[] findRoleIdsByUserId(@Param("userId")Long userId);

    @Select("select user_id from user_role_t where role_id=#{roleId}")
    Long[] findUserIdsByRoleId(@Param("roleId")Long roleId);

}
